package main

import (
	"fmt"
	"time"
)

func main() {
	intChan:=make(chan int,1)
	for {
		select {
		case intChan <- 1:
			fmt.Println("send a num")
		case <-intChan:
			fmt.Println("receive a num")
		}
		time.Sleep(500*time.Millisecond)
	}
}
